import request from '@/utils/request'
import { ScmsaService } from '@/utils/request'

export const login = data => ScmsaService.login(data)

export function getInfo(token) {
  return request({
    url: '/user/info',
    method: 'get',
    params: { token }
  })
}

export function logout() {
  return request({
    url: '/user/logout',
    method: 'post'
  })
}
export const getPhone = params => ScmsaService.getPhone(params)

export const getVerify = params => ScmsaService.getVerify(params)

export const passwordReset = params => ScmsaService.passwordReset(params)

export const getUser = params => ScmsaService.getUser(params)

export const updateUser = data => ScmsaService.updateUser(data)

export const getTokenByTranCode = code => ScmsaService.getTokenByTranCode(code)

export const getUserAccountsList = code => ScmsaService.getUserAccountsList(code)

export const resendRequest = ({ url, method, baseURL, params, data }) => ScmsaService.resendRequest({ url,
  method,
  baseURL,
  params,
  data
})
